THREADSOURCES=${wildcard *.cpp}
THREADOBJECTS=${patsubst %.cpp, obj/%.o, ${wildcard *.cpp}}

obj/%.o: %.cpp
	g++ -g -o obj/$*.o -c $*.cpp -I.
install: $(THREADOBJECTS)
	g++ -g -o exec $(THREADOBJECTS) -lpthread -lrt -I obj
	./exec
echo:
	@echo $(THREADSOURCES)
	@echo $(THREADOBJECTS)
clean:
	rm obj/*.o exec
